package com.ruoyi.law.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.law.mapper.ContentCaseStepMapper;
import com.ruoyi.law.domain.ContentCaseStep;
import com.ruoyi.law.service.IContentCaseStepService;

/**
 * 流程步骤Service业务层处理
 * 
 * @author gyl
 * @date 2025-02-27
 */
@Service
public class ContentCaseStepServiceImpl implements IContentCaseStepService 
{
    @Autowired
    private ContentCaseStepMapper contentCaseStepMapper;

    /**
     * 查询流程步骤
     * 
     * @param stepId 流程步骤主键
     * @return 流程步骤
     */
    @Override
    public ContentCaseStep selectContentCaseStepByStepId(Long stepId)
    {
        return contentCaseStepMapper.selectContentCaseStepByStepId(stepId);
    }

    /**
     * 查询流程步骤列表
     * 
     * @param contentCaseStep 流程步骤
     * @return 流程步骤
     */
    @Override
    public List<ContentCaseStep> selectContentCaseStepList(ContentCaseStep contentCaseStep)
    {
        return contentCaseStepMapper.selectContentCaseStepList(contentCaseStep);
    }

    /**
     * 新增流程步骤
     * 
     * @param contentCaseStep 流程步骤
     * @return 结果
     */
    @Override
    public int insertContentCaseStep(ContentCaseStep contentCaseStep)
    {
        contentCaseStep.setCreateTime(DateUtils.getNowDate());
        return contentCaseStepMapper.insertContentCaseStep(contentCaseStep);
    }

    /**
     * 修改流程步骤
     * 
     * @param contentCaseStep 流程步骤
     * @return 结果
     */
    @Override
    public int updateContentCaseStep(ContentCaseStep contentCaseStep)
    {
        contentCaseStep.setUpdateTime(DateUtils.getNowDate());
        return contentCaseStepMapper.updateContentCaseStep(contentCaseStep);
    }

    /**
     * 批量删除流程步骤
     * 
     * @param stepIds 需要删除的流程步骤主键
     * @return 结果
     */
    @Override
    public int deleteContentCaseStepByStepIds(Long[] stepIds)
    {
        return contentCaseStepMapper.deleteContentCaseStepByStepIds(stepIds);
    }

    /**
     * 删除流程步骤信息
     * 
     * @param stepId 流程步骤主键
     * @return 结果
     */
    @Override
    public int deleteContentCaseStepByStepId(Long stepId)
    {
        return contentCaseStepMapper.deleteContentCaseStepByStepId(stepId);
    }
}
